package com.csy.ocmis.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.csy.ocmis.entity.Registeredtype;
import com.csy.ocmis.service.IRegisteredtypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器 挂号类型
 * </p>
 *
 * @author csy
 * @since 2020-11-29
 */
@RestController
@RequestMapping("/registeredtype")
public class RegisteredtypeController {
    @Autowired
    private IRegisteredtypeService registeredtypeService;

    //查询所有的挂号类型
    @RequestMapping("/seldp")
    public Object selreg(){
        List<Registeredtype> selreg = registeredtypeService.list(null);
        return selreg;
    }
    //根据挂号类型查找该类型的价格
    @RequestMapping("seltymo")
    public Object seltymo(Registeredtype cRegisteredtype){
        Double seltymo = registeredtypeService.getById(cRegisteredtype.getRegisteredId()).getPrice();
        return seltymo;
    }
}

